<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <link rel="stylesheet" type="text/css" href="../../c-asserts/mui/css/mui.min.css" />
    <style type="text/css">
        .mui-title input[type='search'] {
            background-color: #FFF;
            text-align: left;
            border-radius: 5px;
            background-image: url(../../icon/sousuo.png);
            background-position: 3px 3px;
            background-size: 23px 23px;
            background-repeat: no-repeat;
            padding-left: 30px;
            font-size: 16px;
            color: #8f8f94;
        }
    </style> 
</head>
<body>
<header class="mui-bar mui-bar-nav" >
    <button class="mui-btn mui-btn-link mui-btn-nav mui-pull-left" onclick="api.closeWin()">
        <span class="mui-icon iconfont mui-icon-back"></span>
    </button>
    <form>
        <h1 class="mui-title"><input class="iname" type="search"  placeholder="请输入店铺名/主题名"/></h1>
    </form>
    <button class="mui-btn mui-btn-link mui-btn-nav mui-pull-right search-btn">
        <span >搜索</span>
    </button>
</header>
</body>
<script type="text/javascript" src="../../script/api.js"></script>
<script type="text/javascript" src="../../script/jquery-2.1.3.min.js"></script>
<script type="text/javascript" src="../../script/public.js"></script>
<script type="text/javascript">
    $(document).ready(function(){
        var iosHeight = iosConfig($('.mui-bar-nav'));
        api.openFrame({
            name: 'searchinfo',
            url: 'searchinfo.html',
            bounces: false,
            rect: {
            	x: 0,
            	y: 44 + iosHeight,
            	w: api.winWidth,
            	h: api.winHeight - 44 - iosHeight
            }
        });
        api.parseTapmode();

        $('form').submit(function(){
            setoption();
            return false;
        });

        $('.search-btn').on('click',function(){
            setoption();
        })
    };

    function setoption(){
        var name = $('.iname').val();
        api.sendEvent({name:'setoption',extra:{type:'iname',name:name}});
        api.closeWin();
    }
</script>
</html>